<?php
/**
 * 自动加载类
 * @param String $className
 */
function __autoload($className){
	define("COURSOR_DIR",'PHPSeniorDev');
	$parts = explode('_', $className);
	$path = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.COURSOR_DIR.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts);
	
	require_once $path.'.php';
}


$stu1 = Lab7_Singleton::getInstance('walala', 19);
echo $stu1->getInfo();
$stu2 = Lab7_Singleton::getInstance();
echo $stu2->getInfo();
$stu2->setName("wahaha");
echo $stu1->getInfo();
